package com.lzp.wechat.entity.message;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

@Data
@NoArgsConstructor
@XStreamAlias("xml")
@ApiModel(value = "文本消息")
public class TextMessage extends BaseMessage {

    @XStreamAlias("Content")
    @ApiModelProperty(value = "回复的消息内容", notes = "换行：在content中能够换行，微信客户端就支持换行显示")
    private String content;

    public TextMessage(Map<String, String> requestMap, String content) {
        super(requestMap);
        // 设置文本msgType为text
        this.setMsgType("text");
        this.content = content;
    }

}
